﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Vinetlife.Master" AutoEventWireup="true"
    CodeBehind="ListAccount.aspx.cs" Inherits="VINETLIFE.Customers.ListAccount" %>

<%@ Register Src="/Module/ucVnLeftCustomerMenu.ascx" TagName="ucVnLeftCustomerMenu"
    TagPrefix="uc1" %>
<%@ Register Src="/Module/ucVnAccountInfo.ascx" TagName="ucVnAccountInfo" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="main-container-inner">
        <div class="main-container-inner">
            <div id="breadcrumb">
                <ul class="crumbs">
                    <li class="first"><a href="/" style="z-index: 9;" title="Trang chủ"><span></span>Trang
                        chủ</a></li>
                    <li><a href="/trang-ca-nhan/" style="z-index: 8;">Trang cá nhân</a></li>
                      <li><a href="#" style="z-index: 8;">Danh sách tài khoản</a></li>
                </ul>
            </div>
            <div class="t-content-wrap">
                <div class="main-container-inner-left">
                    <uc1:ucVnLeftCustomerMenu ID="ucVnLeftCustomerMenu1" runat="server" />
                </div>
                <div class="main-container-inner-right">
                    <h2>
                        Danh sách tài khoản</h2>
                    <div style="float: left; width: 100%;">
                        <asp:GridView ID="gvAt" DataKeyNames="ID" runat="server" AutoGenerateColumns="False"
                            OnRowDeleting="gvAt_RowDeleting" OnSelectedIndexChanged="gvAt_SelectedIndexChanged"
                            PageSize="50" CssClass="tstyle2" Width="100%" PagerStyle-CssClass="pgr" AllowPaging="true"
                            OnPageIndexChanged="gvAt_PageIndexChanged" OnPageIndexChanging="gvAt_PageIndexChanging">
                            <Columns>
                                <asp:TemplateField ItemStyle-Width="5%" HeaderText="Số TT" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <%# Container.DataItemIndex +1 %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="Username" HeaderText="Chủ tài khoản" SortExpression="Username"
                                    ItemStyle-Width="15%" />
                                <asp:BoundField DataField="AccountType" HeaderText="Loại tài khoản" SortExpression="AccountType"
                                    ItemStyle-Width="10%" />
                                <asp:BoundField DataField="AccountText" HeaderText="Chi nhánh" SortExpression="AccountText"
                                    ItemStyle-Width="20%" />
                                <asp:BoundField DataField="AccountValue" HeaderText="Số tài khoản" SortExpression="AccountValue"
                                    ItemStyle-Width="20%" />
                                <asp:BoundField DataField="CreatedDate" HeaderText="Ngày tạo" SortExpression="CreatedDate"
                                    ItemStyle-Width="10%" />
                                      <asp:TemplateField HeaderText="Kích hoạt">
                                    <ItemTemplate>
                                        <asp:Label ID="lblTotal" runat="server" Text='<%#(bool.Parse(Eval("Active").ToString())) ? " Sử dụng " : "Không sử dụng" %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center" />
                                    <ItemStyle Width="15%" HorizontalAlign="Center" />
                                </asp:TemplateField>
                                <asp:TemplateField ItemStyle-Width="5%" HeaderText="Thao tác" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <asp:ImageButton ID="btEdit" runat="server" CommandName="Select" ImageUrl="~/AdminCP/images/edit_16x16.gif" />
                                        <asp:ImageButton ID="btDelete" runat="server" CommandArgument='<%#Eval("ID") %>'
                                            CommandName="Delete" ImageUrl="~/AdminCP/images/delete_16x16.gif" OnClientClick="return confirm('Có muốn xóa bản ghi này? Nhấn OK để xóa!')" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                        <br />
                        <asp:Button CssClass="button-gg-green" ID="btnAdd" runat="server" OnClick="btnAdd_Click"
                            Text="Thêm mới" />
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
